<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>demo1</title>
</head>
<body>
<div id="app">
    <h1 v-if="seen">Yes</h1>
    <button v-on:click="setSeen(true)">seen</button>
    <button v-on:click="setSeen(false)">not seen</button><br><br>

    <button v-on:click="count++">click</button><br>
    you have clicked this button {{ count }} times<br><br>

    <button v-on:click="countNums">click</button><br>
    you have clicked this button {{ clicknum }} times
</div>
<script src="vue.js"></script>
<script>
    var app = new Vue({
        el:"#app",
        data:{
            seen:false,
            clicknum:0,
            count:0
        },
        methods:{
            setSeen: function(isseen){
                this.seen = isseen;
            },
            countNums: function (event) {
                this.clicknum ++;
                if(event)console.log(event);
            }
        }
    });
</script>
</body>
</html>